
from tortoise.models import Model
from tortoise import fields

class Song(Model):
    id = fields.BigIntField(pk=True, generated=True)
    name = fields.CharField(max_length=64)
    singer = fields.CharField(max_length=64)
    ext = fields.CharField(max_length=16)
    duration = fields.IntField(default=0)
    md5 = fields.CharField(max_length=64)
    create_time = fields.DatetimeField(auto_now_add=True, null=True)
    update_time = fields.DatetimeField(auto_now=True, null=True)
    del_flag = fields.BooleanField(default=False, null=True)

    class Meta:
        table = 't_song'
